package com.wyyc.entity;

import javax.persistence.*;

/**
 * Created by Hwei~ on 2017/6/7.
 */
@Entity
@Table(name = "citys", schema = "", catalog = "db_wycar")
public class CitysEntity {
    private int id;
    private String province;
    private String cityName;
    private String cityCode;
    private String abbr;
    private String engine;
    private String engineno;
    private String clazz;
    private String classno;
    private String regist;
    private String registno;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Basic
    @Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    @Basic
    @Column(name = "abbr")
    public String getAbbr() {
        return abbr;
    }

    public void setAbbr(String abbr) {
        this.abbr = abbr;
    }

    @Basic
    @Column(name = "engine")
    public String getEngine() {
        return engine;
    }

    public void setEngine(String engine) {
        this.engine = engine;
    }

    @Basic
    @Column(name = "engineno")
    public String getEngineno() {
        return engineno;
    }

    public void setEngineno(String engineno) {
        this.engineno = engineno;
    }

    @Basic
    @Column(name = "class")
    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    @Basic
    @Column(name = "classno")
    public String getClassno() {
        return classno;
    }

    public void setClassno(String classno) {
        this.classno = classno;
    }

    @Basic
    @Column(name = "regist")
    public String getRegist() {
        return regist;
    }

    public void setRegist(String regist) {
        this.regist = regist;
    }

    @Basic
    @Column(name = "registno")
    public String getRegistno() {
        return registno;
    }

    public void setRegistno(String registno) {
        this.registno = registno;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CitysEntity that = (CitysEntity) o;

        if (id != that.id) return false;
        if (abbr != null ? !abbr.equals(that.abbr) : that.abbr != null) return false;
        if (cityCode != null ? !cityCode.equals(that.cityCode) : that.cityCode != null) return false;
        if (cityName != null ? !cityName.equals(that.cityName) : that.cityName != null) return false;
        if (classno != null ? !classno.equals(that.classno) : that.classno != null) return false;
        if (clazz != null ? !clazz.equals(that.clazz) : that.clazz != null) return false;
        if (engine != null ? !engine.equals(that.engine) : that.engine != null) return false;
        if (engineno != null ? !engineno.equals(that.engineno) : that.engineno != null) return false;
        if (province != null ? !province.equals(that.province) : that.province != null) return false;
        if (regist != null ? !regist.equals(that.regist) : that.regist != null) return false;
        if (registno != null ? !registno.equals(that.registno) : that.registno != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (province != null ? province.hashCode() : 0);
        result = 31 * result + (cityName != null ? cityName.hashCode() : 0);
        result = 31 * result + (cityCode != null ? cityCode.hashCode() : 0);
        result = 31 * result + (abbr != null ? abbr.hashCode() : 0);
        result = 31 * result + (engine != null ? engine.hashCode() : 0);
        result = 31 * result + (engineno != null ? engineno.hashCode() : 0);
        result = 31 * result + (clazz != null ? clazz.hashCode() : 0);
        result = 31 * result + (classno != null ? classno.hashCode() : 0);
        result = 31 * result + (regist != null ? regist.hashCode() : 0);
        result = 31 * result + (registno != null ? registno.hashCode() : 0);
        return result;
    }
}
